<?php
/**
 * 描述
 * Created by Paco
 * Date: 2019/1/25 Time: 12:00
 */

namespace App\Http\Request\Product;


use App\Http\Request\Store;

class BrandStore extends Store
{
    public function rules()
    {
        $rules = [
            'name' => 'required',
            'logo' => 'required',
        ];

        $method = strtoupper($this->method());
        if ($method == 'PUT') {
            $rules = [
                'name' => 'required',
                'brand_id' => 'required|integer',
            ];
        }

        return $rules;
    }
}